package com.zbl.parser;

import com.xuxueli.crawler.parser.strategy.NonPageParser;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 * @Author: zhangjun
 * @Date: 2020/7/31 9:59
 * @Description:
 */
public class QuanBenUserParser extends NonPageParser {
    @Override
    public void parse(String url, String pageSource) {
        Document document = Jsoup.parse(pageSource);
        Elements trs = document.select(".grid tr:gt(0)");
        for (Element tr : trs) {
            System.out.println(tr.select("td:eq(0)").text() + "：" + tr.select("td:eq(1)").text());
        }
    }
}
